************************************************
***Title: robustness_additional_restrictions.do
***Creators: Joelle Abramowitz, Shooshan Danagoulian, and Owen Fleming*
***Notes: This file produces the main estimates of the effect of pollen exposure on suicide using additional restrictions to the analytic sample. 

*For questions, contact
*Owen Fleming
*hg3490@wayne.edu
************************************************


**********SETUP
use data/for_analysis, clear


**********PRODUCE ESTIMATES
*Treatment: location-season quartiles
eststo main_s3_no0: ppmlhdfe count pollen_q2_ls pollen_q3_ls pollen_q4_ls $weather if pollen != 0, absorb(county year_month month_day) cluster(county) tolerance(1e-06)
estadd ysumm
estadd scalar counties = e(N_clust)
estadd local Controls "Weather" 
estadd local FE "County, Year x Month, Month x Day"

*Treatment: location-season quartiles
eststo main_s3_ss: ppmlhdfe count pollen_q2_ls pollen_q3_ls pollen_q4_ls $weather if inlist(month,3,4,5,6,7,8), absorb(county year_month month_day) cluster(county) tolerance(1e-06)
estadd ysumm
estadd scalar counties = e(N_clust)
estadd local Controls "Weather" 
estadd local FE "County, Year x Month, Month x Day"

*Treatment: location-season quartiles
eststo main_s3_temp: ppmlhdfe count pollen_q2_ls pollen_q3_ls pollen_q4_ls $weather if tmin > 50, absorb(county year_month month_day) cluster(county) tolerance(1e-06)
estadd ysumm
estadd scalar counties = e(N_clust)
estadd local Controls "Weather" 
estadd local FE "County, Year x Month, Month x Day"


**********EXPORT
estout using results/robustness_additional_restrictions.xls, cells(b(star label(Coef.) fmt(4)) se(par(`"="("'`")""') label(Std. Err.) fmt(4))) stats(ymean N counties Controls FE) starlevels(* 0.1 ** 0.05 *** 0.01) keep(pollen_q2_ls pollen_q3_ls pollen_q4_ls) legend label replace 
eststo clear


